package com.zhs.gccs.utils;

import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;

public class DrawableUtils {
    public static Drawable getShapeDrawable(float radius,String color){
        GradientDrawable drawable = new GradientDrawable();
        drawable.setCornerRadius(radius);
        drawable.setColor(Color.parseColor(color));
//        drawable.setStroke();
        return drawable;
    }

    public static Drawable getShapeDrawable(float radius,String color,int widthStroke, String colorStroke){
        GradientDrawable drawable = new GradientDrawable();
        drawable.setCornerRadius(radius);
        drawable.setColor(Color.parseColor(color));
        drawable.setStroke(widthStroke,Color.parseColor(colorStroke));
        return drawable;
    }
}
